{extend name='main'}

{block name="content"}

<div class="think-box-shadow">
    {include file='deal/user_recharge_search'}
    <table class="layui-table margin-top-15" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>订单号</th>
            <th class='text-left nowrap'>用户名</th>
            <th class='text-left nowrap'>手机号</th>
            <th class='text-left nowrap'>真实姓名</th>
            <th class='text-left nowrap'>交易数额</th>
            <th class='text-left nowrap'>打款凭证</th>
            <th class='text-left nowrap'>添加时间</th>
            <th class='text-left nowrap'>支付方式</th>
            <th class='text-left nowrap'>类型</th>
            <th class='text-left nowrap'>处理时间</th>
            <th class='text-left nowrap'>二维码</th>
            <th class='text-left nowrap'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='text-left nowrap'>{$vo.id}</td>
            <td class='text-left nowrap'>{$vo.username}</td>
            <td class='text-left nowrap'>{$vo.tel}</td>
            <td class='text-left nowrap'>{$vo.real_name}</td>
            <td class='text-left nowrap'>{$vo.num}</td>
            <td class='text-left nowrap'>
                {if $vo.pic}<a data-dbclick data-title="查看图片" data-modal='{:url("users/picinfo")}?pic={$vo.pic}'><img src="{$vo.pic}" style="width:150px;height:100px;"></a>{else /}<img src="{$vo.pic}" style="width:150px;height:100px;">{/if}
            </td>
            <td class='text-left nowrap'>
                {$vo.addtime|format_datetime}
            </td>
            <td class='text-left nowrap'>
                {$vo.pay_name|default="银行卡充值"}
            </td>

            <td class='text-left nowrap'>
                {if $vo.is_vip }
                <button class="layui-btn layui-btn-xs layui-btn layui-btn-warm">会员升级</button>
                {else/}
                <button class="layui-btn layui-btn-xs layui-btn layui-btn-danger">会员充值</button>

                {/if}
            </td>



            <td class='text-left nowrap'>
                {$vo.endtime|format_datetime}
            </td>
            <td class='text-left nowrap'>
                {switch $vo.status}
                    {case 0}待付款{/case}
                    {case 1}
                        {if auth("edit_recharge")}
                            <a data-csrf="{:systoken('edit_recharge')}" class="layui-btn layui-btn-xs layui-btn" data-action="{:url('edit_recharge',['status'=>2,'id'=>$vo.id])}" data-value="id#{$vo.id};status#2" >通过</a>
                            <a data-csrf="{:systoken('edit_recharge')}" class="layui-btn layui-btn-xs layui-btn-warm" data-action="{:url('edit_recharge',['status'=>3,'id'=>$vo.id])}" data-value="id#{$vo.id};status#3" >驳回</a>
                        {/if}
                    {/case}
                    {case 2}审核通过{/case}
                    {case 3}审核驳回{/case}
                {/switch}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
{/block}
